import "package:flutter/material.dart";
import 'package:flutter_pink_app/style/text.dart';

// 图标文字配对组合
class IconTextMatch extends StatelessWidget {
  final IconData icon; // 图标
  final String text;
  const IconTextMatch({Key key, this.icon, this.text}) : super(key: key);// 文字内容

  @override
  Widget build(BuildContext context) {
    return Row(
      children: <Padding>[
        if (icon != null)
          Padding(
              padding: EdgeInsets.only(right: 5),
              child: Icon(
                icon,
                size: 15,
                color: Colors.grey,
              )),
        if(text != null)
        Padding(
          padding: const EdgeInsets.only(right: 10),
          child: Text("$text", style: videoCardStyle),
        )
      ],
    );
  }
}
